package com.ubing.boot.notesforjava.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

/**
 * @ClassName : RedisUtils
 * @Description : RedisUtils
 * @Author : ubing
 * @Date: 2023-03-30 15:27
 */

@Component
public class RedisUtils {
    @Autowired
    RedisTemplate redisTemplate;
    public  <T> T get(String key){
        Object o = redisTemplate.opsForValue().get(key);
        return (T)o;
    }
}
